import Vue from 'vue'
import Vuex from 'vuex'
import state from './state';
import getters from './getters';
import mutations from './mutations';
import actions from './actions';
import user from './module/user';
import router from './module/router';
import tabNav from './module/tabNav';
// import saveInLocal from './plugin/saveInLocal';

Vue.use(Vuex);

export default new Vuex.Store({
	// 严格模式
	strict: false, // [vuex] do not mutate vuex store state outside mutation handlers.
	// strict: process.env.NODE_ENV === 'production', // 开发环境下使用严格模式
	state,
	getters,
	mutations,
	actions,
	modules: {
		user, router, tabNav
	},
	// 持久化存储
	// plugins: [saveInLocal]
});
